package com.digitalchina.lxnsy.sy.login;

import android.content.Context;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.activity.old.MainActivity;
import com.digitalchina.lxnsy.base.BaseHtmlActivity;
import com.digitalchina.lxnsy.sy.all.ForgetPasswordActivity;
import com.digitalchina.lxnsy.toolkit.ActivityTaskManager;
import com.digitalchina.lxnsy.toolkit.GotoUtil;
import com.digitalchina.lxnsy.toolkit.ToastUtil;
import com.digitalchina.lxnsy.xml.RongCloudXML;
import com.digitalchina.lxnsy.xml.UserXML;

import org.json.JSONException;
import org.json.JSONObject;

public class RegisteredActivity extends BaseHtmlActivity {
    private Context context;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        context = this;
    }

    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("registered");
        setTitle("注册");
    }

    @Override
    public void rightOnClick(){


    }


    public class JsApi {


        @JavascriptInterface
        public void login(Object msg) {
            ToastUtil.showToast(context,"注册成功");
            GotoUtil.gotoActivity(RegisteredActivity.this, RegisterAndLoginActivity.class);
            finish();

        }

        @JavascriptInterface
        public void addExpertInfo(Object msg) {

            ToastUtil.showToast(context,"注册成功");
            finish();
            go(AddExpertInfoActivity.class);


        }


    }
}
